package com.hwadee.springboot.controller;

import com.hwadee.springboot.entity.R;
import com.hwadee.springboot.entity.Student;
import com.hwadee.springboot.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/Login")
public class LoginController {
    @Autowired
    private StudentService studentService;

    @PostMapping(value = "/studentLogin")
    public R studentLogin(@RequestBody Student student) {
        return studentService.login(student.getStudentaccount(), student.getPassword());
    }

}
